<script setup lang="ts">
import { onMounted, watchEffect } from 'vue';
import { useWindowSize } from '@vueuse/core';

const windowSize = useWindowSize();

onMounted(() => {
  const domNode = document.querySelector<HTMLElement>('#app');
  if (!domNode) return;

  domNode.style.position = 'relative';
  domNode.style.inset = '0';

  watchEffect(() => {
    if (domNode) {
      domNode.style.width = windowSize.width.value + 'px';
      domNode.style.height = windowSize.height.value + 'px';
    }
  });
});
</script>

<template>
  <RouterView />
</template>
